package org.example.curriculum_design_6_16.entity.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;
import com.baomidou.mybatisplus.annotation.FieldFill;

/**
 * 
 * @TableName scholarship_candidate
 */
@TableName(value ="scholarship_candidate")
@Data
public class ScholarshipCandidate implements Serializable {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 
     */
    private String studentId;

    /**
     * 国家奖学金/学业奖学金/专项奖学金
     */
    private String scholarshipType;

    /**
     * 2022-2023
     */
    private String applicationYear;

    /**
     * 是否符合基本条件
     */
    @TableField(value = "is_qualified", fill = FieldFill.INSERT)
    private Integer isQualified = 1;

    /**
     * 
     */
    private Double totalScore;

    /**
     * 
     */
    private Integer ranking;

    /**
     * 获奖/未获奖
     */
    private String finalResult;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ScholarshipCandidate other = (ScholarshipCandidate) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getStudentId() == null ? other.getStudentId() == null : this.getStudentId().equals(other.getStudentId()))
            && (this.getScholarshipType() == null ? other.getScholarshipType() == null : this.getScholarshipType().equals(other.getScholarshipType()))
            && (this.getApplicationYear() == null ? other.getApplicationYear() == null : this.getApplicationYear().equals(other.getApplicationYear()))
            && (this.getIsQualified() == null ? other.getIsQualified() == null : this.getIsQualified().equals(other.getIsQualified()))
            && (this.getTotalScore() == null ? other.getTotalScore() == null : this.getTotalScore().equals(other.getTotalScore()))
            && (this.getRanking() == null ? other.getRanking() == null : this.getRanking().equals(other.getRanking()))
            && (this.getFinalResult() == null ? other.getFinalResult() == null : this.getFinalResult().equals(other.getFinalResult()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getStudentId() == null) ? 0 : getStudentId().hashCode());
        result = prime * result + ((getScholarshipType() == null) ? 0 : getScholarshipType().hashCode());
        result = prime * result + ((getApplicationYear() == null) ? 0 : getApplicationYear().hashCode());
        result = prime * result + ((getIsQualified() == null) ? 0 : getIsQualified().hashCode());
        result = prime * result + ((getTotalScore() == null) ? 0 : getTotalScore().hashCode());
        result = prime * result + ((getRanking() == null) ? 0 : getRanking().hashCode());
        result = prime * result + ((getFinalResult() == null) ? 0 : getFinalResult().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", studentId=").append(studentId);
        sb.append(", scholarshipType=").append(scholarshipType);
        sb.append(", applicationYear=").append(applicationYear);
        sb.append(", isQualified=").append(isQualified);
        sb.append(", totalScore=").append(totalScore);
        sb.append(", ranking=").append(ranking);
        sb.append(", finalResult=").append(finalResult);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}